<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    var removeDuplicates = function(nums) {
        let map = []
        for(var i = 0;i<nums.length;i++){
          if(map.indexOf(nums[i])==-1){
            map.push(nums[i])
          }
        }
        return map
    };
    console.log(removeDuplicates([0,0,1,1,1,2,2,3,3,4]))
  </script>
</html>
